#include "MainWindow.h"

#include <QSqlDatabase>
#include <QDebug>

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
{
    //
    QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
    db.setHostName("rwx850.cn");
    db.setPort(3306);
    db.setUserName("root");
    db.setPassword("wa7491625123");
    db.setDatabaseName("go_gateway");

    bool bRet = db.open();
    if(bRet == false) {
        qDebug()<<"Error open databse";
        exit(0);
    }
    qDebug()<< "Client Successful";

}

MainWindow::~MainWindow()
{
}

